package parser;
import antlr.RecognitionException;
import antlr.Token;

class ChainedComparison extends Comparison {
    
    Expr temp;
    
    ChainedComparison(Expr left, String op, Expr right, Expr temp) throws RecognitionException {
        super(left, op, right);
        this.temp = temp;
        temp.lhs();
    }
     
    void write(ByteStream out) throws RecognitionException {
        left.write(out);
        right.write(out);
        out.write(Opcodes.COPY);
        temp.writeLHS(out);
        out.write(Opcodes.BINARY);
        out.write(opID);
    }
    
}
